package com.starry.Spring5Demo.factoryBeans;

import com.starry.Spring5Demo.Book;
import org.springframework.beans.factory.FactoryBean;

public class BookBeanFactory implements FactoryBean<Book> {

    /*
     * 定义返回bean类型*/
    @Override
    public Book getObject() throws Exception {
        return new Book();
    }

    @Override
    public Class<?> getObjectType() {
        return null;
    }

    @Override
    public boolean isSingleton() {
        return FactoryBean.super.isSingleton();
    }
}
